import React from 'react';
import Tab from './components/Tab';
import Father from './components/Father';
import Dialog from './components/Dialog';
import Life from './components/Life';
import './App.css';

// function App() {
//   return (
//     <div className="App">
//         <Life/>
//         {/* <Dialog/> */}
//         {/* <Father/> */}
//         {/* <Tab type="horizontal" arr = {["历史", "地理"]}/>
//         <Tab type="vertical" arr = {["政治", "社会", "生物"]}/> */}
//     </div>
//   );
// }

class App extends React.Component {
   state = {
     title: "我是标题",
     flag: true
   }
   render() {
     const { flag } = this.state
     return  <div className="App">
          <button onClick = {() => {
            this.setState({
              flag: !this.state.flag
            })
          }}>点我</button>
          {
            flag?  <Life title = { this.state.title }/>: ""
          }
      </div>
   }
}


export default App;
